#ifndef _CgManager_h_
#define _CgManager_h_
#include "ShaderManager.h"
#include <GL/glew.h>
#include <GL/glut.h>
#include <Cg/cgGL.h>
#include <math.h>

// error codes
#define  ERROR_CG          -1
#define  ERROR_GLEW        -2
#define  ERROR_TEXTURE     -3
#define  ERROR_BINDFBO     -4
#define  ERROR_FBOTEXTURE  -5
#define  ERROR_PARAMS      -6

class CgManager;

class CgManager : ShaderManager {
protected:
	int argc;
	char **argv;

	//frame buffer object
	GLuint fb;
	GLuint w, h;
	
	
	void initGlew();
	void initFbo();
	void initGlut();
public:
	
	CgManager(int argc, char **argv);
	virtual ~CgManager();
	virtual void init();
	void operator() ();
};

#endif